package com.zero.ava.kernel;

import com.zero.ava.auth.Identity;

/**
 * 优先级执行
 */
public interface PriorityScheduler {

	/**
	 * 储备任务
	 * @param task
	 * @param owner
	 * @param priority
	 * @return
	 */
	TaskReservation reserveTask(KernelRunnable task, Identity owner, Priority priority);

	/**
	 * 执行任务
	 * @param task
	 * @param owner
	 * @param priority
	 */
	void scheduleTask(KernelRunnable task, Identity owner, Priority priority);

}
